Fix resize corners
authorMatthias Clasen <mclasen@redhat.com>
Thu, 3 Jan 2019 00:08:02 +0000 (19:08 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 3 Jan 2019 00:08:02 +0000 (19:08 -0500)
I was stuck in an X session and noticed that my resize corners
all got east or north cursors. It turns out that gnome-shell
does not properly advertise support for edge constraints under X11,
and the absence of that makes the code for determining the edge
under the cursor misbehave.

This change should fix that.

gtk/gtkwindow.c

index 339b0e6f89e646429b6ffea7713ebfa2354beebd..1752293c4662e0e48c4fffcb2ac4105b82127392 100644 (file)
@@ -1774,8 +1774,7 @@ edge_under_coordinates (GtkWindow     *window,
           edge != GDK_SURFACE_EDGE_SOUTH)
         return FALSE;
 
-      if (supports_edge_constraints &&
-          (edge == GDK_SURFACE_EDGE_NORTH ||
+      if ((edge == GDK_SURFACE_EDGE_NORTH ||
            edge == GDK_SURFACE_EDGE_SOUTH) &&
           (priv->edge_constraints & constraints_for_edge (GDK_SURFACE_EDGE_WEST)))
         return FALSE;
@@ -1789,8 +1788,7 @@ edge_under_coordinates (GtkWindow     *window,
           edge != GDK_SURFACE_EDGE_SOUTH)
         return FALSE;
 
-      if (supports_edge_constraints &&
-          (edge == GDK_SURFACE_EDGE_NORTH ||
+      if ((edge == GDK_SURFACE_EDGE_NORTH ||
            edge == GDK_SURFACE_EDGE_SOUTH) &&
           (priv->edge_constraints & constraints_for_edge (GDK_SURFACE_EDGE_EAST)))
         return FALSE;
@@ -1809,8 +1807,7 @@ edge_under_coordinates (GtkWindow     *window,
           edge != GDK_SURFACE_EDGE_WEST)
         return FALSE;
 
-      if (supports_edge_constraints &&
-          (edge == GDK_SURFACE_EDGE_EAST ||
+      if ((edge == GDK_SURFACE_EDGE_EAST ||
            edge == GDK_SURFACE_EDGE_WEST) &&
           (priv->edge_constraints & constraints_for_edge (GDK_SURFACE_EDGE_NORTH)))
         return FALSE;
@@ -1824,8 +1821,7 @@ edge_under_coordinates (GtkWindow     *window,
           edge != GDK_SURFACE_EDGE_WEST)
         return FALSE;
 
-      if (supports_edge_constraints &&
-          (edge == GDK_SURFACE_EDGE_EAST ||
+      if ((edge == GDK_SURFACE_EDGE_EAST ||
            edge == GDK_SURFACE_EDGE_WEST) &&
           (priv->edge_constraints & constraints_for_edge (GDK_SURFACE_EDGE_SOUTH)))
         return FALSE;